package com.sdgakj.enums;

public enum EnumOrderStatus {
     DELETE(0, "已取消"),
    NEEDPAY(1, "已创建"),
      ISPAY(2, "上架"),
    COMPLETED(3, "交易完成"),
       CLOSED(4, "订单取消"),
    REFUNDAPPLY(5, "退款审核中"),
    REFUNDING(6, "退款中"),
    REFUNDEND(7, "退款完成"),
    PLAYMONEY(8, "打款完成"),
    REFUNDREFUSE(9, "退款拒绝"),
    SENDWRONG(10, "打款失败"),
    //打款失败后  可以由财务重新触发打款
    REPLAY(11,"重新提交打款");

    private Integer code;

    private String name;

    private EnumOrderStatus(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static EnumOrderStatus getEnum(String value) {
        for (EnumOrderStatus e : EnumOrderStatus.values()) {
            if (value.equals(e.getCode())) {
                return e;
            }
        }
        return null;
    }
}
